<!doctype html>
<html style="width:100%;height:100%;" xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org"
      xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity3">
<head>
	<meta charset="utf-8">
	<link href="css/main.css" type="text/css" rel="stylesheet" />
	<link href="css/communicate.css" type="text/css" rel="stylesheet" />
	<link href="images/favicon.ico" rel="shortcut icon"/>
	<title>中国人寿管理平台</title>
	<style>
		.homeimg{
			position:absolute;
			top:24%;
			left:0;
		}
		.userword{
			position:absolute;
			top:18px;
			left:-10px;
		}
		.marginf{
			position:absolute;
			top:0;
			left:50%;
			margin-left:-640px;
			width:1280px;
			height:100%;
			overflow:hidden;
		}
	</style>
</head>

<body style="width:100%;height:100%;">

<div class="maindiv" style="min-width:1200px;height:100%;">
			<div class="maindvcont" style="width:100%;height:100%;">
				<img id="qyptbatp" src="images/1.jpg" width="100%" />
				<div class="marginf">
					<img src="images/homeimg.png" class="homeimg">
					<img src="images/sevenlogo.png" class="fuwuber">
					<div class="kuat">
						<p class="tilefuwupt"><span>锅炉云平台</span></p>
						<p class="kuantpp"><img src="images/userword.png" class="yhig">
							<input type="text" id="account" name="account" placeholder="" maxlength="32"class="ipt" /></p>
						<p class="kuantpp"><img src="images/password.png" class="yhig">
							<input type="password" id="pwd" name="pwd" placeholder="" maxlength="32" class="ipt" />						
						</p>
						<p class="yzma">
						<input type="text" size="20" placeholder="验证码" id="verifyCode" name="verifyCode" maxlength="4" onkeydown="if(event.keyCode==13)logincheck()" /><a href="javascript:void(0)" class="indentity_img"><img id="randimg" src="getRand.do" style="cursor: pointer" title="点击换一张" /> </a>	
						</p>
						<span class="error_clew"></span>
						<img src="images/aload.png" class="userword">
						<p class="denglule">
							<button class="enter_btn" type="button" onclick="logincheck()">
							登录
						</button>
						</p>
				</div>
				
					
				</div>
					
			</div>
		</div>




<script type="text/javascript" src="js/jquery-1.10.2.min.js"></script>
<script type="text/javascript" src="js/jquery.md5.js"></script>
<script src="js/common.js"></script>
<script src="js/login.js"></script>
<script>
//切换验证码
$('#randimg').click(function () {
	var that = this;
	var img = new Image();
	img.src = 'getRand.do?'+ Math.random();
	img.onload = function(){
		that.src = this.src;
	};
});
var height = document.body.clientHeight;
console.log(height);
$('#qyptbatp').css({
	height:height
});
//验证登录
function logincheck(){
	var account = $("#account").val();
	var pwd = $("#pwd").val();
	var verifyCode =  $("#verifyCode").val();
	if(account.length<=0 || account=='帐号'){
		showTips("请输入帐号");
	}else if(pwd.length<=0 || pwd=='密码'){
		showTips("请输入密码");
	}else if(verifyCode.length<=0 || verifyCode=='验证码'){
		showTips("请输入验证码");
	}else{
		$.ajax({
			url: 'login.do', 
			type: 'POST',
			async: false,
			data:{account:account,pwd:$.md5(pwd),verifyCode:verifyCode}, 
			dataType: 'json', 
			timeout: 10000, 
			error: function(){showTips('请求失败,请稍后重试');}, 
			success: function(result){
				if(result.resultCode==1000){
					location.href ="goIndex.do";
				}else{
					$(".error_clew").html(result.returnObject).show();
					$("#randimg").click();
				}
			} 
			}); 
	}
}




</script>
</body>
</html>
